Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

targetframework net5.0 #2452

Closed
wants to merge 6 commits into from
Closed

targetframework net5.0 #2452

wants to merge 6 commits into from

Conversation

vip32
Copy link

@vip32 vip32 commented Nov 12, 2020

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Checklist:

  • [x ] My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • [ x] All new and existing tests passed.

@vip32 vip32 mentioned this pull request Nov 12, 2020
@arturcic
Copy link
Member

@vip32 that is a good start, but we need to run the tests against net5.0 as well, we need also to adjust the build to run the docker images to test the artifacts as well as build docker images targeting .net5.0

@digitalsigi
Copy link

@vip32 Sounds great.
I'd like to test it in my environment and give feedback . Where can I get the artifacts? I would need gitversiontask for Windows and ubuntu.

@asbjornu
Copy link
Member

@digitalsigi, click the green checkmark next to the commit you'd like to download and you will be taken to GitHub Actions where you can find the built artifacts for that particular build:

image

Copy link
Member

@arturcic arturcic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you also need to add net5.0 target for all *Tests projects

@vip32
Copy link
Author

vip32 commented Nov 13, 2020

@arturcic anything needs to be done in the docker testing department? can't find where i can specify the netversions for the various docker tests

@arturcic
Copy link
Member

@arturcic anything needs to be done in the docker testing department? can't find where i can specify the netversions for the various docker tests

We need to build new base images to be able to test - here is the source code
https://github.com/GitTools/build-images.

Then we need to adjust the azure pipelines

distros: [ 'alpine.3.10-x64', 'centos.7-x64', 'debian.9-x64', 'fedora.30-x64', 'ubuntu.16.04-x64', 'ubuntu.18.04-x64' ]

distros: [ 'alpine.3.10-x64', 'centos.7-x64', 'debian.9-x64', 'fedora.30-x64', 'ubuntu.16.04-x64', 'ubuntu.18.04-x64' ]

and GitHub actions

targetFramework: [3.1]

targetFramework: [3.1]

@vip32
Copy link
Author

vip32 commented Nov 13, 2020

should 5.0 be added here, or replace the 3.1
image
where is the 2.1?

@arturcic
Copy link
Member

should 5.0 be added here, or replace the 3.1
Please add 5.0

2.1 was removed some time ago to speed up the build time. We might consider dropping support for 2.1 and just keep 3.1 and 5.0

@vip32
Copy link
Author

vip32 commented Nov 13, 2020

ok, am stuck. the (docker)test errors don't make clear what is missing

@arturcic
Copy link
Member

ok, am stuck. the (docker)test errors don't make clear what is missing

I think not docker is the issue, as you don't get to those step yet. Seems like there is an issue with nunit and .net5.0

@vip32
Copy link
Author

vip32 commented Nov 13, 2020

ok, am stuck. the (docker)test errors don't make clear what is missing

I think not docker is the issue, as you don't get to those step yet. Seems like there is an issue with nunit and .net5.0

locally the .net5 nunit tests run fine

@codecov
Copy link

codecov bot commented Nov 14, 2020

Codecov Report

Merging #2452 (26def75) into master (26def75) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2452   +/-   ##
=======================================
  Coverage   78.05%   78.05%           
=======================================
  Files         147      147           
  Lines        5077     5077           
=======================================
  Hits         3963     3963           
  Misses       1114     1114           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 26def75...3d9ff83. Read the comment docs.

@arturcic arturcic changed the title targetframework net5.0 for GitVersionExe targetframework net5.0 Nov 14, 2020
@arturcic
Copy link
Member

I think this is the source of the issue https://github.com/GitTools/GitVersion/blob/master/src/GitVersionTask.Tests/Helpers/MsBuildExeFixture.cs#L67

Currently we use nunit 3.12 that does not recognize the .net 5.0 as a valid runtime. There is a PR on nunit to release a new version that does support .net 5.0 nunit/nunit#3666.

So when they release it, we can continue

@digitalsigi
Copy link

@asbjornu I've download the first successful build. Does it make sense to give it a try or should I wait until anoter clean compile is available?

@asbjornu
Copy link
Member

@digitalsigi, I don't think there's going to happen much here until nunit/nunit#3666 is merged, so please go ahead and test. I would download artifacts from one of the later builds, though; they are available even though the build has failed.

@digitalsigi
Copy link

Tested it in my environment:
Development Environment Windows 10 / VS 2019 / asp.net core Web APP /net.50 -> build OK, Test OK, did show version info as expected
Same source: Docker Build for Ubuntu 18.4: Build failed:

/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error : TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at LibGit2Sharp.Core.NativeMethods.git_buf_dispose(GitBuf buf) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at LibGit2Sharp.Core.Proxy.git_buf_dispose(GitBuf buf) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at LibGit2Sharp.Core.Handles.GitBuf.Dispose() [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at LibGit2Sharp.Core.Proxy.ConvertPath(Func`2 pathRetriever) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at LibGit2Sharp.Core.Proxy.git_repository_discover(FilePath start_path) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at LibGit2Sharp.Repository.Discover(String startingPath) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at GitVersion.Extensions.GitVersionOptionsExtensions.GetDotGitDirectory(GitVersionOptions gitVersionOptions) in D:\a\GitVersion\GitVersion\src\GitVersionCore\Extensions\GitVersionOptionsExtensions.cs:line 12 [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at System.Lazy`1.CreateValue() [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at GitVersion.GitVersionOptions.get_DotGitDirectory() in D:\a\GitVersion\GitVersion\src\GitVersionCore\Model\GitVersionOptions.cs:line 26 [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at GitVersion.GitPreparer.Prepare() in D:\a\GitVersion\GitVersion\src\GitVersionCore\Core\GitPreparer.cs:line 37 [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at GitVersion.GitVersionTool.CalculateVersionVariables() in D:\a\GitVersion\GitVersion\src\GitVersionCore\Core\GitVersionTool.cs:line 59 [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at GitVersion.MSBuildTask.GitVersionTaskExecutor..ctor(IGitVersionTool gitVersionTool, IOptions`1 options) in D:\a\GitVersion\GitVersion\src\GitVersionTask\GitVersionTaskExecutor.cs:line 19 [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error : --- End of stack trace from previous location --- [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at GitVersion.MSBuildTask.GitVersionTasks.ExecuteGitVersionTask[T](T task, Action`1 action) in D:\a\GitVersion\GitVersion\src\GitVersionTask\GitVersionTasks.cs:line 27 [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error : DllNotFoundException: Unable to load shared library '/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/tools/netstandard2.0/runtimes/linux-x64/native/libgit2-ef5a385.so' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libssl.so.1.0.0: cannot open shared object file: No such file or directory [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at System.Runtime.InteropServices.NativeLibrary.LoadFromPath(String libraryName, Boolean throwOnError) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at System.Runtime.InteropServices.NativeLibrary.Load(String libraryPath) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at System.Runtime.Loader.AssemblyLoadContext.LoadUnmanagedDllFromPath(String unmanagedDllPath) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at GitVersion.MSBuildTask.LibGit2Sharp.GitLoaderContext.LoadUnmanagedDll(String unmanagedDllName) in D:\a\GitVersion\GitVersion\src\GitVersionTask.MsBuild\LibGit2Sharp\GitLoaderContext.cs:line 67 [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at System.Runtime.Loader.AssemblyLoadContext.ResolveUnmanagedDll(String unmanagedDllName, IntPtr gchManagedAssemblyLoadContext) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at System.Runtime.InteropServices.NativeLibrary.LoadByName(String libraryName, QCallAssembly callingAssembly, Boolean hasDllImportSearchPathFlag, UInt32 dllImportSearchPathFlag, Boolean throwOnError) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at System.Runtime.InteropServices.NativeLibrary.LoadLibraryByName(String libraryName, Assembly assembly, Nullable`1 searchPath, Boolean throwOnError) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at System.Runtime.InteropServices.NativeLibrary.TryLoad(String libraryName, Assembly assembly, Nullable`1 searchPath, IntPtr& handle) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at LibGit2Sharp.Core.NativeMethods.TryLoadLibrary(String libraryName, Assembly assembly, Nullable`1 searchPath, IntPtr& handle) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at LibGit2Sharp.Core.NativeMethods.ResolveDll(String libraryName, Assembly assembly, Nullable`1 searchPath) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at System.Runtime.InteropServices.NativeLibrary.LoadLibraryCallbackStub(String libraryName, Assembly assembly, Boolean hasDllImportSearchPathFlags, UInt32 dllImportSearchPathFlags) [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at LibGit2Sharp.Core.NativeMethods.git_libgit2_init() [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary() [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :    at LibGit2Sharp.Core.NativeMethods..cctor() [/src/src/avsweb/avsweb.csproj]
/root/.nuget/packages/gitversiontask/5.6.0-pullrequest2452-32/build/GitVersionTask.targets(46,9): error :  [/src/src/avsweb/avsweb.csproj]

@asbjornu
Copy link
Member

nunit/nunit#3666 is now merged, perhaps we can try an upgrade and get this thing moving again?

@arturcic
Copy link
Member

nunit/nunit#3666 is now merged, perhaps we can try an upgrade and get this thing moving again?

Well maybe, but verison 3.13 of nunit it was not yet released

@asbjornu
Copy link
Member

Well maybe, but verison 3.13 of nunit it was not yet released

I see. There are no pre-releases we can try either?

@SeppPenner
Copy link

I see. There are no pre-releases we can try either?

Doesn't seem so...

@arturcic
Copy link
Member

Closing in favor of #2486.

@vip32 Thank you for the initial PR, I have taken your changes into my PR

@arturcic arturcic closed this Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants